package com.ruoyi.inventory.service.impl;

import java.util.List;
import com.ruoyi.goods.domain.TGoodsInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.inventory.mapper.WCheckGoodsRelMapper;
import com.ruoyi.inventory.domain.WCheckGoodsRel;
import com.ruoyi.inventory.service.IWCheckGoodsRelService;

/**
 * 盘库关联Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-11 12:51:49
 */
@Service
public class WCheckGoodsRelServiceImpl implements IWCheckGoodsRelService 
{
    @Autowired
    private WCheckGoodsRelMapper wCheckGoodsRelMapper;

    /**
     * 查询盘库关联
     * 
     * @param checkGoodsId 盘库关联主键
     * @return 盘库关联
     */
    @Override
    public WCheckGoodsRel selectWCheckGoodsRelByCheckGoodsId(Long checkGoodsId)
    {
        return wCheckGoodsRelMapper.selectWCheckGoodsRelByCheckGoodsId(checkGoodsId);
    }

    /**
     * 查询盘库关联列表
     * 
     * @param wCheckGoodsRel 盘库关联
     * @return 盘库关联
     */
    @Override
    public List<WCheckGoodsRel> selectWCheckGoodsRelList(WCheckGoodsRel wCheckGoodsRel)
    {
        return wCheckGoodsRelMapper.selectWCheckGoodsRelList(wCheckGoodsRel);
    }

    /**
     * 新增盘库关联
     * 
     * @param wCheckGoodsRel 盘库关联
     * @return 结果
     */
    @Override
    public int insertWCheckGoodsRel(WCheckGoodsRel wCheckGoodsRel)
    {
        return wCheckGoodsRelMapper.insertWCheckGoodsRel(wCheckGoodsRel);
    }

    /**
     * 修改盘库关联
     * 
     * @param wCheckGoodsRel 盘库关联
     * @return 结果
     */
    @Override
    public int updateWCheckGoodsRel(WCheckGoodsRel wCheckGoodsRel)
    {
        return wCheckGoodsRelMapper.updateWCheckGoodsRel(wCheckGoodsRel);
    }

    /**
     * 批量删除盘库关联
     * 
     * @param checkGoodsIds 需要删除的盘库关联主键
     * @return 结果
     */
    @Override
    public int deleteWCheckGoodsRelByCheckGoodsIds(Long[] checkGoodsIds)
    {
        return wCheckGoodsRelMapper.deleteWCheckGoodsRelByCheckGoodsIds(checkGoodsIds);
    }

    /**
     * 删除盘库关联信息
     * 
     * @param checkGoodsId 盘库关联主键
     * @return 结果
     */
    @Override
    public int deleteWCheckGoodsRelByCheckGoodsId(Long checkGoodsId)
    {
        return wCheckGoodsRelMapper.deleteWCheckGoodsRelByCheckGoodsId(checkGoodsId);
    }

    /**
     * 新增盘库关联
     *
     * @param tGoodsInfo 盘库关联
     * @param checkGoodsId 盘库关联
     * @return 结果
     */
    @Override
    public int insertWCheckGoodsRelExt(TGoodsInfo tGoodsInfo, Long checkGoodsId)
    {
        return wCheckGoodsRelMapper.insertWCheckGoodsRelExt(tGoodsInfo, checkGoodsId);
    }

    /**
     * 盘库盘库操作
     *
     * @param tGoodsInfo 盘库关联
     * @param checkGoodsId 盘库关联
     * @return 结果
     */
    @Override
    public int checkGoodsByGoodsInfo(TGoodsInfo tGoodsInfo, Long checkGoodsId)
    {
        return wCheckGoodsRelMapper.checkGoodsByGoodsInfo(tGoodsInfo, checkGoodsId);
    }

    /**
     * 查询盘库关联
     *
     * @param wCheckGoodsRel 盘库关联主键
     * @return 盘库关联
     */
    @Override
    public WCheckGoodsRel selectWCheckGoodsRelByCheckGoodsRel(WCheckGoodsRel wCheckGoodsRel)
    {
        return wCheckGoodsRelMapper.selectWCheckGoodsRelByCheckGoodsRel(wCheckGoodsRel);
    }

    /**
     * 批量删除盘库关联
     *
     * @param goodsIds 需要删除的盘库关联货物主键集合
     * @param checkGoodsId 需要删除的盘库关联主键
     * @return 结果
     */
    @Override
    public int deleteWCheckGoodsRelByCheckGoodsIdsExt(Long[] goodsIds, Long checkGoodsId)
    {
        return wCheckGoodsRelMapper.deleteWCheckGoodsRelByCheckGoodsIdsExt(goodsIds, checkGoodsId);
    }
}
